package cloud.server1.service.task;

import java.util.Date;

import org.springframework.stereotype.Service;

import kilim.Mailbox;
import kilim.Pausable;
import kilim.Task;

@Service
public class TaskA extends Task {
	public static Mailbox<String> MB = new Mailbox<String>();

	public void execute() throws Pausable {
		for (int i = 0; i < 100; i++) {
			Thread cu = Thread.currentThread();
			TaskB.MB.putnb("TaskA " + i);
			String s = MB.get();
			System.out.println("TaskA 运行位置  " + i+" MB接收到信息 " + s + " 当前线程 " + cu.getId() + " 时间 " + new Date().toLocaleString());
		}
	}
}
